package com.example.hello;

import android.graphics.Color;
import android.os.Bundle;
import android.util.Log;
import android.util.TypedValue;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import com.example.hello.utils.Conversion;

public class MainActivity2 extends AppCompatActivity {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);
        TextView textView = findViewById(R.id.main2);
        textView.setText(R.string.hello);
        textView.setTextSize(30);
        textView.setTextColor(0xff00ff00);

        /*ViewGroup.LayoutParams layoutParams = textView.getLayoutParams();
        layoutParams.width = Conversion.dp2px(this, 150f);
        textView.setLayoutParams(layoutParams);*/

        textView.setBackgroundColor(Color.BLUE);
    }
}
